Field of the Invention
The present invention generally relates to graphics processing and more specifically to a method and system for reducing a polygon bounding box.
Description of the Related Art
A conventional graphics processing unit (GPU) implements a bounding box to rasterize a polygon into pixels that can be processed and then displayed on a display screen. The bounding box surrounds the polygon and may indicate which pixels are covered by that polygon, as illustrated by conceptual diagram 500 shown in FIG. 5. As shown, a triangle 502 partially covers pixels 512, 514, 516, and 518. A bounding box 520 surrounds the triangle 502 and includes pixel centers 512, 514, 516, and 518, indicating that corresponding pixels 504, 506, 508, and 510 should be processed in conjunction with triangle 502.
One problem with conventional bounding box techniques is that pixels not actually covered by a polygon are often identified by the bounding box and then processed for display. Referring again to FIG. 5, pixel centers 512 and 514 are included within the bounding box 520, indicating that pixels 504 and 506 should be processed. However, triangle 502 does not actually cover pixel centers 512 and 514, and so pixels 504 and 506 do not actually need to be processed in conjunction with triangle 502. Processing extraneous pixels wastes GPU resources and decreases GPU throughput.
Accordingly, what is needed in the art is an improved bounding box technique.